#include "AnimatedSprite.h"


AnimatedSprite::AnimatedSprite(LPD3DXSPRITE SpriteHandler,Texture *texture, int Width, int Height, int Count, int SpritePerRow,int StartIndex )
	:Sprite(SpriteHandler, texture, Width, Height, SpritePerRow, StartIndex)
{
	_Count = Count;
}

AnimatedSprite::~AnimatedSprite(void){}


void AnimatedSprite::Next()
{
	_Index = (_Index + 1) % _Count + _StartIndex;
}

void AnimatedSprite::Reset()
{
	_Index =_StartIndex;
}